<%@ page language="java" contentType="text/html; charset=UTF-8"   pageEncoding="UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/commonList.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="${ctx}/scripts/common.js"></script>
<script type="text/javascript" src="${ctx }/scripts/common/prototype.js"></script>
<title>预交款可抵冲房间列表</title>
<script type="text/javascript">
	var curHouseId = null ;//房间ID
	var curAccountId=null;//总帐户ID
	//单击设置当前行 houseId,及accountId
	function onRowClick(houseId,accountId){
		curHouseId = houseId;
		curAccountId = accountId;
		parent.setParameter(houseId,accountId);
	}

	//双击加载预交款帐户交易明细页面
	function showDetail(houseId,accountId){
		curHouseId=houseId;
		curAccountId = accountId;
		var url = "${ctx }/charge_preparePayAction.do?method=housePreparePayDetailList&keyword="+houseId+"&accountId="+accountId+"&modelType=offset";
		top.windowOpen(url, "housePreparePayDetailList", "${key.housePreparePayDetailList}", 500, 850);
	}

	//加载变更方案页面
	function modifyScheme(){
		if (curHouseId == null || curHouseId == ""){
			Alert("${key.nullParameterWarning}");
			return ;
		}
		var url = "${ctx }/charge_preparePayAction.do?method=initChangeChargeScheme&keyword="+curHouseId+"&accountId="+curAccountId+"&refreshIframe=prePayOffsetListFrame";
		top.windowOpen(url, "changeChargeScheme", "${key.modifyScheme}", 200, 400);
	}

	//清除父窗口中的房间ID
	function clean(){
		parent.setParameter(null,null);
		parent.window.document.all('prePayOffsetListFrame').style.height=document.body.scrollHeight;
	}

	//页面刷新
	function refresh(obj){
		var url = "${ctx }/charge_preparePayAction.do?method=initList";
		window.location.href=url;
	}

	function resize(){
		parent.window.document.all('prePayOffsetListFrame').style.height=document.body.scrollHeight;
	}
</script>
</head>
<body onload="clean();resize();" style="overflow:auto;">
<ec:ceTable items="list"
			action="${ctx }/charge_preparePayAction.do?method=initList"
			var="item"
			view="pmsview"
			styleClass="gridData2"
			rowsDisplayed="15" >
	<ec:ceRow styleClass="grid"  onclick="onRowClick('${item.houseId }',${item.accountId });"  onContextMenu="return ShowContextMenu(event,'quick_rightmenu');" ondblclick="showDetail('${item.houseId }',${item.accountId });">
		<ec:ceColumn width="8%" headerCell="pmsHeadrCell" title="${key.houseName }" property="houseName" sortable="true"></ec:ceColumn>
		<ec:ceColumn width="8%" headerCell="pmsHeadrCell" title="${key.ownerNames }" property="ownerNames"></ec:ceColumn>
		<ec:ceColumn width="8%" headerCell="pmsHeadrCell" title="${key.chargeAccountBalance }" property="chargeAccountBalance"></ec:ceColumn>
		<ec:ceColumn width="8%" headerCell="pmsHeadrCell" title="${key.schemeName }" property="schemeName"></ec:ceColumn>
		<ec:ceColumn width="8%" headerCell="pmsHeadrCell" title="${key.prePayAccountBalance }" property="prePayAccountBalance"></ec:ceColumn>
	</ec:ceRow>
</ec:ceTable>

 <div id="quick_rightmenu" style="display:none;" oncontextmenu="return false" class="quick_menu2" onMouseOver="showmy2menu('quick_rightmenu')"  onMouseOut="hidden2menu('quick_rightmenu')" >
  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="grid_quickMenu_bg">

    <tr>
      <td><table width="100%" border="0" cellpadding="2" cellspacing="0">
      <pms:AuthTag authName="charge_preparePayAction.do?method=changeChargeScheme">
			<tr><td class="quickMenu_toolbarico"><a href="#" onClick="modifyScheme();" onFocus="this.blur()"><img src="${ctx}/images/ico_worktable_charge.gif" alt="${key.modifyScheme }" width="16" height="16"  border="0" align="absbottom" />&nbsp;${key.modifyScheme }</a> </td></tr>
      	  </pms:AuthTag>
      	  </table></td>
    </tr>
  </table>
 <script type="text/javascript">

	var div1=document.getElementById('quick_rightmenu');
	if(div1.getElementsByTagName("tr").length==1){
	div1.innerHTML="";
	}
</script>
</div>

</body>
</html>

